﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo03
{
    class Computer
    {
        public string Name { get; set; }

        public IUSB usb1 { get; set; }
        public IUSB usb2 { get; set; }

        public Computer(string name)
        {
            this.Name = name;
        }

        public void Starting()
        {
            Console.WriteLine("{0}正在开机",this.Name);
        }

        public void Usb1()
        {
            this.usb1.Write();
            this.usb1.Read();
        }
        public void Usb2()
        {
            this.usb2.Write();
            this.usb2.Read();
        }
        public void Shutdown()
        {
            Console.WriteLine("{0}正在关机", this.Name);
        }
    }
}
